//常见问题
'use strict';
import React, { Component } from 'react';
import {
  View,
  Text,
  TouchableOpacity,
  ListView,
  StyleSheet,
  Animated,
  WebView,
} from 'react-native';
import NavBar from '../components/NavigatorBar';
import * as defaultStyles from '../constants/DefaultStyles';
import { Actions } from 'react-native-router-flux';

export default class CommonProblemContainer extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }

  render() {
    return (
      <View style={styles.container}>
        <NavBar leftImage="angle-left" navBarColor={defaultStyles.LIGHTBLUE}
                title="常见问题" leftClick={() => Actions.pop()}/>
        {/*<ListView dataSource={this.state.dataSource} renderRow={this._renderRow}*/}
                  {/*style={styles.listContainer}/>*/}
        <WebView  automaticallyAdjustContentInsets={true}
                  style={{flex: 1}}
                  source={require('../web/index.html')}
                  javaScriptEnabled={true}
                  domStorageEnabled={true}
                  decelerationRate="normal"
                  startInLoadingState={true}
                  scalesPageToFit={true}
                  scrollEnabled={true}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  listContainer: {
    flex: 1,
    backgroundColor: defaultStyles.WHITEOFBACKGROUND,
  },
  cellContainer: {
    height: 45,
    backgroundColor: 'white',
    flexDirection: 'row',
  },
  //cell左侧空白
  whiteContainer: {
    width: 20,
  },
  cellContent: {
    flex: 1,
    alignItems: 'center',
    flexDirection: 'row',
    borderBottomWidth: 0.5,
    borderBottomColor: 'rgba(214, 214, 214, 1.00)',
  }
});
